package cn.xc.system.mapper;

import cn.xc.system.domain.Role;
import cn.xc.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Tom
 * @since 2022-07-20
 */
public interface RoleMapper extends BaseMapper<Role> {

    //添加中间表信息：t_role_permission
    void saveRolePermissons(@Param("roleId")Long roleId, @Param("permissions")List<Long> permissions);
    //添加中间表信息：t_role_menu
    void saveRoleMenus(@Param("roleId")Long roleId, @Param("menus")List<Long> menus);

    void removeRermissionByRoleId(Long id);

    void removeMenuByRoleId(Long id);

}
